-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(product-assistant): product memory #27270
Conversation
Size Change: 0 B Total Size: 1.11 MB ℹ️ View Unchanged
|
…nto feat/core-agent-memory
Been testing initialization with demo data containing `dropbox.com`. The instructions around "sites like Crunchbase" were confusing the Sonar model, as it was often thinking we're looking at a product _like_ Crunchbase etc. This seems to improve the handling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed a few tweaks which should make things work even better. Overall, beautiful stuff
ee/hogai/utils/nodes.py
Outdated
return None | ||
|
||
@property | ||
def product_core_memory(self) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if the product_
prefix helps, maybe core_memory_content
?
ee/hogai/summarizer/nodes.py
Outdated
@@ -84,7 +84,7 @@ def run(self, state: AssistantState, config: RunnableConfig) -> PartialAssistant | |||
message = chain.invoke( | |||
{ | |||
"query_kind": viz_message.answer.kind, | |||
"product_description": self._team.project.product_description, | |||
"product_description": self.product_core_memory, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this become "core_memory"
too?
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
Problem
LLMs are stateless, so our agents are dumb when questions require details. This PR gives them the ability to remember simple facts about a user's company or product in the core memory. The core memory is a text that the background agent continuously updates using two actions: appending a new fragment and replacing an existing fragment. The memory agent triggers on each new human message (surprisingly cost-effective).
Additionally, the PR includes another agent scraping the initial memory from the Internet. It searches in taxonomy for existing $host (preferable) or $app_namespace (app bundle id) and scrapes relevant sources using Perplexity to automatically fill the agent's initial core memory. However, this information is not always reliable, so we always confirm that we've scraped the memory correctly.
Demos
Changes
Does this work well for both Cloud and self-hosted?
No
How did you test this code?
Manual testing, unit tests.